
import React from 'react';

import styles from './localstream.css';
import { Card,Button  } from 'antd';
import { PlayCircleOutlined } from '@ant-design/icons';
import {startCamera} from '../utils/WebRtcUtils'

export default function () {
  return (
    <div className={styles.normal}>
      <Card
        hoverable

        
        style={{ width: 480,display:'block',margin:'auto' }}
        cover={<video  id="localVideo" autoPlay/>}
      >
        <Button type="primary" icon={<PlayCircleOutlined />} onClick={() => startCamera('localVideo')} > 获取本地视频流</Button>
      </Card>
    </div>
  );
}
